<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>坐骑详情</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="/web/res/css/xadmin.css">
    <script src="/web/res/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/web/res/js/xadmin.js"></script>
    <script type="text/javascript" src="/web/res/js/common.js"></script>
</head>

<div style="background-color: white;">
    <div class="layui-fluid" id="orderEdit">
        <div class="layui-card-body"   style="overflow:auto">
                <table class="layui-table layui-form tableH"   lay-size="sm"  id="tables">
                    <thead>
                    <tr>
                        <th>装扮类型</th>
                        <th>装扮名称</th>
                        <th>图片</th>
                        <th>装扮id</th>
                        <th>到期时间</th>
                        <th>购买时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    当前坐骑
                    <#if mones?? && (mones?size > 0) >
                    <#list mones as mones>
                    <tr>
                        <td>坐骑</td>
                        <td>${mones.goodname!''}</td>
                        <td><img src="${mones.goodpic!''}" style="width: 150px;"></td>
                        <td>${(mones.mountsid?c)!''}</td>
                        <td>${(mones.overtime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
                        <td>${(mones.buyingtime?string("yyyy-MM-dd HH:mm:ss"))!}</td>
                    </tr>
                    </#list>
                    <#else>
                    <tr>
                        <td colspan="6" style="text-align: center;">暂无记录</td>
                    </tr>
                </#if>
                </tbody>
                </table>
            </div>
        </div>
    </div>
    <script>
        layui.use(['laydate', 'form', 'table'], function () {
            let $ = layui.$;
            var laydate = layui.laydate;
            var form = layui.form;
            var table = layui.table;

            $(".img_biges").click(function(){
                var url = $(this).attr('title');
                var xbcmz =url.split(',');
                $.each(xbcmz, function (index, item) {
                    showimg(item)
                })
            });



        });
    </script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use(['laypage', 'layer', 'form'], function(){
        let $ = layui.$;
        var laypage = layui.laypage
            ,form = layui.form
            ,layer = layui.layer;

        laypage.render({
            elem: 'pager'
            ,count: ${(splitPage.totalCount?c)!''}
            ,limit: ${(splitPage.pageSize?c)!''}
            ,curr: ${(splitPage.pageIndex?c)!''}
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip']
            ,jump: function(obj, first){
                //首次不执行
                if(!first){
                    var myform = document.forms[0];
                    // alert("formName:"+myform.id);
                    var pageIndex = document.createElement("input");
                    pageIndex.name="pageIndex";
                    pageIndex.type="hidden";
                    pageIndex.value=obj.curr;
                    myform.appendChild(pageIndex);

                    var pageSize = document.createElement("input");
                    pageSize.name="pageSize";
                    pageSize.type="hidden";
                    pageSize.value=obj.limit;
                    myform.appendChild(pageSize);
                    // myform.submit();

                    // $("button[lay-filter]")
                    // form.on('submit(button[lay-filter])', function(data){
                    //     // layer.msg(JSON.stringify(data.field));
                    //     // return false;
                    // });
                    // var submitBtn = $("button[lay-submit]");
                    // alert(submitBtn);
                    // console.log(submitBtn)
                    // layer.msg(JSON.stringify(submitBtn));

                    // $('[lay-filter="search"]').click();
                    // $('#chaxun').click();
                    $("button[lay-submit]:eq(0)").click();
                    // $("button[lay-submit]")[0].click();
                    // alert($("#formsubmit").attr("action")+"_获取数量："+obj.limit+"_页码数："+obj.curr);
                    // console.log(obj)
                }
            }
        });
    });
</script>
</body>

</html>